package com.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.api.common.jwt.TokenIgnore;
import com.api.common.reqres.Request;
import com.api.common.reqres.Response;
import com.api.model.request.DynamicInforDetailRequest;
import com.api.model.request.NullRequest;
import com.api.model.response.DynamicInforDetailResponse;
import com.api.model.response.StudyReportResponse;
import com.api.model.response.ActivityInforResponse;
import com.api.model.response.DynamicInforResponse;
import com.api.service.NoticeService;

import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 用户通知
 * </p>
 *
 * @author cfp
 * @since 2019-10-16
 */
@TokenIgnore
@RestController
public class NoticeController {
	@Autowired
	private NoticeService noticeService;

	@ApiOperation(notes = "学习报告通知", value = "学习报告通知")
	@PostMapping(value = "/studyReport.do")
	public Response<StudyReportResponse> studyReport(@RequestBody Request<NullRequest> request) throws Exception {
		return noticeService.studyReport(request);
	}

	@ApiOperation(notes = "活动信息通知", value = "活动信息通知")
	@PostMapping(value = "/activityInfor.do")
	public Response<ActivityInforResponse> activityInfor(@RequestBody Request<NullRequest> request) throws Exception {
		return noticeService.activityInfor(request);
	}

	@ApiOperation(notes = "动态信息通知", value = "动态信息通知")
	@PostMapping(value = "/dynamicInfor.do")
	public Response<DynamicInforResponse> dynamicInfor(@RequestBody Request<NullRequest> request) throws Exception {
		return noticeService.dynamicInfor(request);
	}

	@ApiOperation(notes = "动态信息通知详情", value = "动态信息通知详情")
	@PostMapping(value = "/dynamicInforDetail.do")
	public Response<DynamicInforDetailResponse> dynamicInforDetail(@RequestBody Request<DynamicInforDetailRequest> request)
			throws Exception {
		return noticeService.dynamicInforDetail(request);
	}

}
